package chenjun.mydatabindingdemo.activity;

import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;

/**
 * Created by n6 on 2016/9/29.
 */
public abstract class BaseActivity extends AppCompatActivity {

    protected Context mContext;
    protected String packageName;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setView();
        mContext = this;
        packageName = getPackageName();
        initData();
        initViews();
        setListener();
    }

    protected abstract void setView();

    protected abstract void setListener();

    protected abstract void initViews();

    protected abstract void initData();
}
